CREATEMENU

Top  Previous  Next

Syntax

UINT = CREATEMENU(OPT popup as INT)

Description

Low level menu function used internally by menu creation macros.

Parameters

popup - Optional. Specifies whether the returned handle is a top level or popup menu. If equal to 1 then a popup menu is created

Return value

A handle to the newly created menu

Remarks

Used only for special cases where the menu creation macros do not provide enough functionality.

See Also: APPENDMENU, SETMENU

Example usage

hMenu = CreateMenu()
hPopup = CreateMenu(1)
APPENDMENU(hMenu, "File", MF_POPUP|MF_STRING, hPopup)
APPENDMENU(hPopup,"Open",MF_STRING,1)
APPENDMENU(hPopup,"Quit",MF_STRING,2)
SETMENU win, hMenu